# coding: utf-8

from app.ccws.constant import ALLOW_FILES


def make_sure_audio_type(filename):
    """
    create by ld_wu 2017-08-07
    通过文件名来限定上传文件为mp3格式
    :return:
    """
    if not isinstance(filename, str):
        return False
    return '.' in filename and filename.rsplit('.', 1)[1] in ALLOW_FILES


